package com.ygqh.baby.mapper;

import java.util.List;

import com.ygqh.baby.ao.CommentType;
import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.YgMessageModel;
import com.ygqh.baby.po.YgMessage;
import com.ygqh.baby.po.YgMessageExample;

public interface YgMessageMapper {
	int countByExample(YgMessageExample example);

	int deleteByExample(YgMessageExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgMessage record);

	int insertSelective(YgMessage record);

	List<YgMessage> selectByExample(YgMessageExample example);

	YgMessage selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgMessage record, @Param("example") YgMessageExample example);

	int updateByExample(@Param("record") YgMessage record, @Param("example") YgMessageExample example);

	int updateByPrimaryKeySelective(YgMessage record);

	int updateByPrimaryKey(YgMessage record);

	int countSuper(@Param("q") String q);

	List<YgMessage> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

	List<YgMessageModel> selectUserMessageList(@Param("queryInfo") QueryInfo queryInfo, @Param("userId") Long userId, @Param("isRead") Boolean isRead, @Param("commentType")CommentType commentType);

	int selectUnReadCount(@Param("userId") Long userId);

}
